package com.heima.api;

import com.heima.model.article.dtos.ArticleBehaviorDto;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.user.dtos.AuthDto;
import com.heima.model.user.pojos.ApUser;
import com.heima.model.user.pojos.ApUserFan;
import com.heima.model.user.pojos.ApUserFollow;
import com.heima.model.wemedia.pojos.WmUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(value = "leadnews-user")
public interface UserClient {
    @PostMapping("/list")
    public ResponseResult list(@RequestBody AuthDto dto);

    @PostMapping("/authFail")
    public ResponseResult authFail(@RequestBody AuthDto dto);

    @PostMapping("/authPass")
    public ResponseResult authPass(@RequestBody AuthDto dto);

    /**
     * 通过 id 获取用户
     * @param userid 用户 id
     * @return 用户基本信息
     */
    @GetMapping("/getById")
    ApUser getById(Integer userid);

    @PostMapping("/getFollowById")
    ApUserFollow getFollowById(Integer authorId);

}
